from typing import Optional, Union, List

from pydantic import BaseModel, validator


class UserCreateForm(BaseModel):
    name: Union[str, None] = None
    pwd: Union[str, None] = None
    tel: Union[str, None] = None

    @validator(pwd)
    def handle_pwd(self, pwd):
        return pwd


class UserDeleteForm(BaseModel):
    id: int = None
